home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / Laserdisk.adf / PALwindow / PALwindow.c < prev    next >
C/C++ Source or Header  |  1987-05-06  |  2KB  |  49 lines

  1. /*****************************************************************************
  2. **                               **
  3. **    Einfache Routine zur Vergroesserung des CLI Windows auf die maximale  **
  4. **    Groesse im PAL Bildschirm.                            **
  5. **                               **
  6. **                        P  A  L    W  i  n  d  o  w                       **
  7. **                                    **
  8. ** 1987 by Holger Banko, Ligusterstr. 4, 4570 Quakenbrueck, Tel.:05431/4803 **
  9. **                                    **
  10. *****************************************************************************/
  11.  
  12. #include"intuition/intuition.h"
  13. struct Window *ActCliWind;
  14. struct IntuitionBase *IntuitionBase;
  15.  
  16. main()
  17. {
  18.    SHORT x, y;
  19.  
  20.    if(!(IntuitionBase= OpenLibrary("intuition.library",0))) {
  21.    printf("Kann 'intuition.library' nicht oeffnen\n");
  22.    exit(FALSE);
  23.    }
  24.  
  25.    ActCliWind=IntuitionBase->ActiveWindow;
  26.  
  27.    if(ActCliWind != NULL) {
  28.  
  29.       x=-ActCliWind->LeftEdge;      /* Entfernung vom Linken Rand -     */
  30.       y=-ActCliWind->TopEdge;       /* Entfernung von Oben -            */
  31.       MoveWindow(ActCliWind,x,y);   /* Um -x und -y Window zurueckbewegen */
  32.  
  33.       /* Breite vom Screen von der Breite des Windows abziehen */
  34.       x=IntuitionBase->ActiveScreen->Width-ActCliWind->Width;  
  35.  
  36.       /* Hoehe vom Screen von der Hoehe des Windows abziehen */
  37.       y=IntuitionBase->ActiveScreen->Height-ActCliWind->Height;
  38.  
  39.       SizeWindow(ActCliWind,x,y);  /* Window um x und y vergroessern */
  40.  
  41.       CloseLibrary(IntuitionBase);
  42.    } 
  43.    else
  44.    {
  45.       CloseLibrary(IntuitionBase);
  46.       exit(FALSE);
  47.    }
  48. }
  49.